package com.jsgt.greekfire.bean

import android.os.Parcel
import android.os.Parcelable

class MainAssetsBean() : Parcelable {
    var assetId: Int? = null
    var image: Int? = null
    var name: String? = null
    var amount: String? = null
    var rmbrice: String? = null
    var assetGuid: String? = null

    constructor(parcel: Parcel) : this() {
        assetId = parcel.readValue(Int::class.java.classLoader) as? Int
        image = parcel.readValue(Int::class.java.classLoader) as? Int
        name = parcel.readString()
        amount = parcel.readString()
        rmbrice = parcel.readString()
        assetGuid = parcel.readString()
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeValue(assetId)
        parcel.writeValue(image)
        parcel.writeString(name)
        parcel.writeString(amount)
        parcel.writeString(rmbrice)
        parcel.writeString(assetGuid)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<MainAssetsBean> {
        override fun createFromParcel(parcel: Parcel): MainAssetsBean {
            return MainAssetsBean(parcel)
        }

        override fun newArray(size: Int): Array<MainAssetsBean?> {
            return arrayOfNulls(size)
        }
    }


}